home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Programmation / Gooey1.3.1 / C Templates / mmCommon.h < prev    next >
Text File  |  1995-01-31  |  38KB  |  1,231 lines

  1. $$Message MM Precompile headers, mmHeaders.c
  2. $$File mmHeaders.c
  3. /*  $CopyRight$ */
  4. /*   mmHeaders                    Type definitions
  5.  
  6.     Name:  mmHeaders.c
  7.     Function:  Precompile headers for Gooey¬ code.
  8.     History: $Date$ Original by $Author$
  9.  
  10.  
  11.     To add a header, change its "#if 0" to "#if 1".
  12.     To remove a header, change its "#if 1" to "#if 0".
  13.     
  14.     THINK C NOTE: You must used 'relaxed ANSI' to do the precompile, strict ANSI will
  15.             generate errors.
  16.     
  17. */
  18.  
  19.  
  20. #ifndef _H_MacHeaders
  21. #define _H_MacHeaders
  22.  
  23.  
  24. #if defined(THINK_C) || defined(THINK_CPLUS)
  25. #ifndef __SC__
  26.  
  27. // set this to 0 (zero) to retain full prototypes
  28. // set this to 1 (one) for "simplified" prototypes
  29. #define SIMPLIFY_PROTOTYPES        0
  30.  
  31. #endif
  32. #else
  33.  
  34. //    To allow the use of ToolBox calls which have now become obsolete on PowerPC, but
  35. //    which are still needed for System 6 applications, we need to #define OBSOLETE.  If
  36. //    your application will never use these calls then you can comment out this #define.
  37.  
  38. #define OBSOLETE    1
  39.  
  40. //    Metrowerks-specific Toolbox definitions
  41. //    These definitions are commonly used but not in Apple's headers. We define
  42. //    them in our precompiled header so we can use the Apple headers without modification.
  43.  
  44. #define PtoCstr        p2cstr
  45. #define CtoPstr        c2pstr
  46. #define CtoPString    c2pstr
  47. #define PtoCString    p2cstr
  48.  
  49. #if defined(THINK_C) || defined(THINK_CPLUS)
  50. #define Length(s)    (*(unsigned char *)(s))
  51. #endif
  52. #define topLeft(r)    (((Point *) &(r))[0])
  53. #define botRight(r)    (((Point *) &(r))[1])
  54.  
  55. #define TRUE        true
  56. #define FALSE        false
  57.  
  58. //    We need to include this file 
  59. #include <MixedMode.h>
  60. long GetCurrentA5(void)
  61.  ONEWORDINLINE(0x200D);
  62.  
  63. #endif
  64.  
  65.     #if 0
  66.         #include <ActionAtomIntf.h>
  67.     #endif
  68.     #if 0
  69.         #include <ADSP.h>
  70.     #endif
  71.  
  72.     #if 1
  73.         #include <AEObjects.h>
  74.     #endif
  75.     #if 1
  76.         #include <AEPackObject.h>
  77.     #endif
  78.  
  79.     #if 0
  80.         #include <AERegistry.h>
  81.     #endif
  82.     
  83.     #if 0
  84.         #include <AIFF.h>
  85.     #endif
  86.  
  87.     #if 1
  88.         #ifdef __APPLETALK__
  89.             #include <Aliases.h>
  90.         #else
  91.             #define __APPLETALK__            // suppress unnecessary #include <AppleTalk.h>
  92.             #include <Aliases.h>
  93.             #undef __APPLETALK__
  94.         #endif
  95.     #endif
  96.  
  97.     #if 1
  98.         #ifdef __EPPC__
  99.             #include <AppleEvents.h>
  100.         #else
  101.             #define __EPPC__                // suppress unnecessary #include <EPPC.h>
  102.             #include <AppleEvents.h>
  103.             #undef __EPPC__
  104.         #endif
  105.     #endif
  106.  
  107.     #if 0
  108.         #include <AppleTalk.h>
  109.     #endif
  110.  
  111.     #if 0
  112.         #ifdef __TRAPS__
  113.             #include <Balloons.h>
  114.         #else
  115.             #define __TRAPS__                // suppress unnecessary #include <Traps.h>
  116.             #define _Pack14 0xA830            // (well, mostly unnecessary...)
  117.             #include <Balloons.h>
  118.             #undef _Pack14
  119.             #undef __TRAPS__
  120.         #endif
  121.     #endif
  122.  
  123. #if defined(THINK_C) || defined(THINK_CPLUS)
  124.     #if 1
  125.         #include <BDC.h>
  126.     #endif
  127. #endif
  128.  
  129.     #if 0
  130.         #include <CommResources.h>
  131.     #endif
  132.     #if 0
  133.         #include <Components.h>
  134.     #endif
  135.     #if 0
  136.         #include <Connections.h>
  137.     #endif
  138.     #if 0
  139.         #include <ConnectionTools.h>
  140.     #endif
  141.  
  142.     #if 1
  143.         #include <Controls.h>
  144.     #endif
  145.  
  146.     #if 0
  147.         #include <CRMSerialDevices.h>
  148.     #endif
  149.     #if 0
  150.         #include <CTBUtilities.h>
  151.     #endif
  152.     #if 0
  153.         #include <DatabaseAccess.h>
  154.     #endif
  155.  
  156.     #if 1
  157.         #include <Desk.h>
  158.     #endif
  159.  
  160.     #if 0
  161.         #include <DeskBus.h>
  162.     #endif
  163.  
  164.     #if 1
  165.         #include <Devices.h>
  166.     #endif
  167.     #if 1
  168.         #include <Dialogs.h>
  169.     #endif
  170.     #if 1
  171.         #include <DiskInit.h>
  172.     #endif
  173.  
  174.     #if 0
  175.         #include <Disks.h>
  176.     #endif
  177.     #if 0
  178.         #include <Editions.h>
  179.     #endif
  180.     #if 0
  181.         #include <ENET.h>
  182.     #endif
  183.     #if 0
  184.         #include <EPPC.h>
  185.     #endif
  186.  
  187.     #if 1
  188.         #include <Errors.h>
  189.     #endif
  190.     #if 1
  191.         #include <Events.h>
  192.     #endif
  193.     #if 1
  194.         #include <Files.h>
  195.     #endif
  196.  
  197.     #if 0
  198.         #include <FileTransfers.h>
  199.     #endif
  200.     #if 0
  201.         #include <FileTransferTools.h>
  202.     #endif
  203.     #if 0
  204.         #include <Finder.h>
  205.     #endif
  206.     #if 0
  207.         #include <FixMath.h>
  208.     #endif
  209.  
  210.     #if 1
  211.         #include <Folders.h>
  212.     #endif
  213.     #if 1
  214.         #include <Fonts.h>
  215.     #endif
  216.     #if 1
  217.         #include <GestaltEqu.h>
  218.     #endif
  219.  
  220.     #if 0
  221.         #include <Graf3D.h>
  222.     #endif
  223.     #if 0
  224.         #include <HyperXCmd.h>
  225.     #endif
  226.  
  227.     #if 1
  228.         #include <Icons.h>
  229.     #endif
  230.  
  231.     #if 0
  232.         #include <ImageCodec.h>
  233.     #endif
  234.     #if 0
  235.         #include <ImageCompression.h>
  236.     #endif
  237.     #if 0
  238.         #include <Language.h>
  239.     #endif
  240.  
  241.     #if 1
  242.         #include <Lists.h>
  243.     #endif
  244.  
  245.     #if 0
  246.         #include <MediaHandlers.h>
  247.     #endif
  248.  
  249.     #if 1
  250.         #include <Memory.h>
  251.     #endif
  252.     #if 1
  253.         #include <Menus.h>
  254.     #endif
  255.  
  256.     #if 0
  257.         #include <MIDI.h>
  258.     #endif
  259.     #if 0
  260.         #include <Movies.h>
  261.     #endif
  262.     #if 0
  263.         #include <MoviesFormat.h>
  264.     #endif
  265.         
  266.     #if 1
  267.         #include <Notification.h>
  268.     #endif
  269.     #if 1
  270.         #include <OSEvents.h>
  271.     #endif
  272.     #if 1
  273.         #include <OSUtils.h>
  274.     #endif
  275.     #if 1
  276.         #include <Packages.h>
  277.     #endif
  278.  
  279.     #if 0
  280.         #include <Palette.h>
  281.     #endif
  282.     #if 0
  283.         #include <Palettes.h>
  284.     #endif
  285.     #if 0
  286.         #include <Picker.h>
  287.     #endif
  288.     #if 0
  289.         #include <PictUtil.h>
  290.     #endif
  291.     #if 0
  292.         #include <Power.h>
  293.     #endif
  294.     #if 0
  295.         #include <PPCToolBox.h>
  296.     #endif
  297. #if defined(THINK_C) || defined(THINK_CPLUS)
  298.     #if 0
  299.         #include <Printing.h>
  300.     #endif
  301.  
  302.     #if 1
  303.         #include <PrintTraps.h>
  304.     #endif
  305. #else
  306.     #if 1
  307.         #include <Printing.h>
  308.     #endif
  309. #endif
  310.  
  311.     #if 0
  312.         #include <Processes.h>
  313.     #endif
  314.  
  315.     #if 1
  316.         #include <QDOffscreen.h>
  317.     #endif
  318.     #if 1
  319.         #include <Quickdraw.h>
  320.     #endif
  321.  
  322.     #if 0
  323.         #include <QuickTimeComponents.h>
  324.     #endif
  325.     
  326.     #if 1
  327.         #include <Resources.h>
  328.     #endif
  329.  
  330.     #if 0
  331.         #include <Retrace.h>
  332.     #endif
  333.     #if 0
  334.         #include <ROMDefs.h>
  335.     #endif
  336.     #if 0
  337.         #include <SANE.h>
  338.     #endif
  339.  
  340.     #if 1
  341.         #include <Scrap.h>
  342.     #endif
  343.  
  344.     #if 0
  345.         #include <Script.h>
  346.     #endif
  347.     #if 0
  348.         #include <SCSI.h>
  349.     #endif
  350.  
  351.     #if 1
  352.         #include <SegLoad.h>
  353.     #endif
  354.  
  355.     #if 0
  356.         #include <Serial.h>
  357.     #endif
  358.     #if 0
  359.         #include <ShutDown.h>
  360.     #endif
  361.     #if 0
  362.         #include <Slots.h>
  363.     #endif
  364.  
  365.     #if 1
  366.         #include <Sound.h>
  367.     #endif
  368.  
  369.     #if 0
  370.         #include <SoundInput.h>
  371.     #endif
  372.  
  373.     #if 1
  374.         #include <StandardFile.h>
  375.     #endif
  376.  
  377.     #if 0
  378.         #include <Start.h>
  379.     #endif
  380.     #if 0
  381.         #include <SysEqu.h>
  382.     #endif
  383.     #if 0
  384.         #include <Terminals.h>
  385.     #endif
  386.     #if 0
  387.         #include <TerminalTools.h>
  388.     #endif
  389.  
  390.     #if 1
  391.         #include <TextEdit.h>
  392.     #endif
  393.     #if 1
  394.         #include <Timer.h>
  395.     #endif
  396.     #if 1
  397.         #include <ToolUtils.h>
  398.     #endif
  399.     #if 1
  400.         #include <Types.h>
  401.     #endif
  402.  
  403.     #if 0
  404.         #include <Values.h>
  405.     #endif
  406.     #if 0
  407.         #include <Video.h>
  408.     #endif
  409.  
  410.     #if 1
  411.         #include <Windows.h>
  412.     #endif
  413.  
  414. #if defined(THINK_C) || defined(THINK_CPLUS)
  415.     #if 1
  416.         #include <pascal.h>
  417.     #endif
  418.  
  419.     #if 1
  420.         #include <asm.h>
  421.     #endif
  422. #else
  423.     #if 0
  424.         #include <asm.h>
  425.     #endif
  426. #endif
  427.  
  428. #if defined(THINK_C) || defined(THINK_CPLUS)
  429.     #if 1 && !defined(__cplusplus)
  430.         #include <LoMem.h>
  431.     #endif
  432.  
  433.     #if 1
  434.         #include <THINK.h>
  435.     #endif
  436. #else
  437.     #if 1
  438.         #include <LowMem.h>
  439.     #endif
  440. #endif
  441.  
  442.     #if 0
  443.         #include <Traps.h>
  444.     #endif
  445.  
  446. #endif
  447.  
  448. /* Defined to get around qd. differences */
  449. #if defined(THINK_C) || defined(THINK_CPLUS)
  450. #define            screenRect        screenBits
  451. #define            QDPort                thePort
  452. #else
  453. #define            screenRect        qd.screenBits
  454. #define            QDPort                qd.thePort
  455. #endif
  456.  
  457. #include "mmTypes$Prototype.name$.h"                /* Gooey types */
  458.  
  459. /* ======================================================= */
  460. /* ======================================================= */
  461.  
  462. $$CloseFile
  463. $$Message MM Types, mm:mmTypes$Prototype.name$.h
  464. $$File mm:mmTypes$Prototype.name$.h
  465. /*  $CopyRight$ */
  466. /*   mmTypes$Prototype.name$                        Type definitions
  467.  
  468.     Name:  mmTypes$Prototype.name$.h
  469.     Function:  Type definitions for Gooey¬ code.
  470.     History: $Date$ Original by $Author$
  471.  
  472. */
  473.  
  474. /* ======================================================= */
  475. /* ======================================================= */
  476.  
  477. /* Basic definitions */
  478. #define NIL                                0L            /* Used for empty pointers and handles */ 
  479.  
  480. /* User event definitions */
  481. #define UserEvent_None                     0            /* No user events available */
  482. #define UserEvent_Open_Window             1            /* Open Window or modeless dialog */
  483. #define UserEvent_Close_Window             2            /* Close Window or modeless dialog */
  484. #define UserEvent_Activate_Window         3            /* Activate Window or modeless dialog */
  485. #define UserEvent_Deactivate_Window     4            /* Deactivate Window or modeless dialog */
  486. /* IDs 0 to 999 reserved for Gooey¬, all others available for special use */
  487.  
  488. /* Menu list resource IDs */
  489. $$Loop Menus
  490. #define Res_Menu_$Menu.name$     $Menu.ID$            /* Menu resource ID, $Menu.FullName$ */
  491. $$Loop MenuItems
  492. #define MItem_$MenuItem.name$     $MenuItem.ID$
  493. $$EndLoop MenuItems
  494.  
  495. $$EndLoop Menus
  496.  
  497. $$Loop HierMenus
  498. #define Res_Menu_$Menu.name$     $Menu.ID$            /* Hier Menu resource ID, $Menu.FullName$ */
  499. $$Loop MenuItems
  500. #define MItem_$MenuItem.name$     $MenuItem.ID$
  501. $$EndLoop MenuItems
  502.  
  503. $$EndLoop HierMenus
  504.  
  505. /* Window resource IDs, also controls grouped with the appropiate window */
  506.  
  507. $$Loop Alerts
  508. /* Variables for the alert titled  "$Worksheet.FullName$" */
  509. #define ResA_$Worksheet.name$        $Worksheet.ID$            /* Alert, $Worksheet.FullName$ */
  510. $$Loop Control.type = Button
  511. #define ResA_$Control.name$    $Control.ItemID$            /* ...Button, $Control.FullName$ */
  512. $$EndLoop
  513. $$Loop Control.type = StaticText
  514. $$if Control.StandardText
  515. #define ResA_$Control.name$    $Control.ItemID$            /* ...Static Text, $Control.FullName$ */
  516. $$endif
  517. $$if Control.SpecialText
  518. #define sResA_$Control.name$    $Control.StringID$        /* ...Static Text, $Control.FullName$ */
  519. $$endif
  520. $$EndLoop
  521. $$Loop Control.type = Icon
  522. #define ResA_$Control.name$    $Control.ItemID$            /* ...Icon, $Control.FullName$ */
  523. #define ResA_N_$Control.name$    $Control.NormalID$
  524. #define ResA_H_$Control.name$    $Control.HilitedID$
  525. $$EndLoop
  526. $$Loop Control.type = Picture
  527. #define ResA_$Control.name$    $Control.ItemID$            /* ...Picture, $Control.FullName$ */
  528. $$if Control.NonGraphic
  529. #define ResA_N_$Control.name$    $Control.NormalID$
  530. $$endif
  531. $$EndLoop
  532. $$Loop Control.type = UButton
  533. #define ResA_$Control.name$    $Control.ItemID$            /* ...Plugin button, $Control.FullName$ */
  534. #define sResA_$Control.name$    $Control.StringID$
  535. #define ResA_N_$Control.name$    $Control.NormalID$
  536. #define ResA_H_$Control.name$    $Control.HilitedID$
  537. $$EndLoop
  538. $$Loop Control.type = HotRect
  539. #define ResA_$Control.name$    $Control.ItemID$            /* ...HotSpot, $Control.FullName$ */
  540. #define sResA_$Control.name$    $Control.StringID$
  541. $$EndLoop
  542. $$Loop Control.type = Sicn
  543. #define ResA_$Control.name$    $Control.ItemID$            /* ...Sicn, $Control.FullName$ */
  544. #define ResA_N_$Control.name$    $Control.NormalID$
  545. #define ResA_H_$Control.name$    $Control.HilitedID$
  546. $$EndLoop
  547.  
  548. $$EndLoop Alerts
  549. $$Loop Dialogs
  550. /* Variables for the Dialog titled  "$Worksheet.FullName$" */
  551. #define ResD_$Worksheet.name$        $Worksheet.ID$            /* Dialog, $Worksheet.FullName$ */
  552. $$Loop Control.type = Button
  553. #define ResD_$Control.name$    $Control.ItemID$            /* ...Button, $Control.FullName$ */
  554. $$EndLoop
  555. $$Loop Control.type = Checkbox
  556. #define ResD_$Control.name$    $Control.ItemID$            /* ...Checkbox, $Control.FullName$ */
  557. $$EndLoop
  558. $$Loop Control.type = Radio
  559. #define ResD_$Control.name$    $Control.ItemID$            /* ...Radio, $Control.FullName$ */
  560. $$EndLoop
  561. $$Loop Control.type = StaticText
  562. $$if Control.StandardText
  563. #define ResD_$Control.name$    $Control.ItemID$            /* ...Static Text, $Control.FullName$ */
  564. $$endif
  565. $$if Control.SpecialText
  566. #define sResD_$Control.name$    $Control.StringID$            /* ...Static Text, $Control.FullName$ */
  567. $$endif
  568. $$EndLoop
  569. $$Loop Control.type = Icon
  570. #define ResD_$Control.name$    $Control.ItemID$            /* ...Icon, $Control.FullName$ */
  571. #define ResD_N_$Control.name$    $Control.NormalID$
  572. #define ResD_H_$Control.name$    $Control.HilitedID$
  573. $$EndLoop
  574. $$Loop Control.type = Picture
  575. #define ResD_$Control.name$    $Control.ItemID$            /* ...Picture, $Control.FullName$ */
  576. $$if Control.NonGraphic
  577. #define ResD_N_$Control.name$    $Control.NormalID$
  578. $$endif
  579. $$EndLoop
  580. $$Loop Control.type = EditText
  581. #define ResD_$Control.name$    $Control.ItemID$            /* ...Edit Text, $Control.FullName$ */
  582. #define sResD_$Control.name$    $Control.StringID$            /* ...Edit Text, $Control.FullName$ */
  583. $$EndLoop
  584. $$Loop Control.type = ScrollBar
  585. #define ResD_$Control.name$    $Control.ItemID$            /* ...ScrollBar, $Control.FullName$ */
  586. $$EndLoop
  587. $$Loop Control.type = UButton
  588. #define ResD_$Control.name$    $Control.ItemID$            /* ...Plugin button, $Control.FullName$ */
  589. #define sResD_$Control.name$    $Control.StringID$
  590. #define ResD_N_$Control.name$    $Control.NormalID$
  591. #define ResD_H_$Control.name$    $Control.HilitedID$
  592. $$EndLoop
  593. $$Loop Control.type = UToggle
  594. #define ResD_$Control.name$    $Control.ItemID$            /* ...Plugin toggle, $Control.FullName$ */
  595. #define sResD_$Control.name$    $Control.StringID$
  596. #define ResD_N_$Control.name$    $Control.NormalID$
  597. #define ResD_H_$Control.name$    $Control.HilitedID$
  598. $$EndLoop
  599. $$Loop Control.type = UGauge
  600. #define ResD_$Control.name$    $Control.ItemID$            /* ...Plugin gauge, $Control.FullName$ */
  601. #define sResD_$Control.name$    $Control.StringID$
  602. #define ResD_N_$Control.name$    $Control.NormalID$
  603. #define ResD_H_$Control.name$    $Control.HilitedID$
  604. $$EndLoop
  605. $$Loop Control.type = List
  606. #define sResD_$Control.name$    $Control.StringID$            /* ...List, $Control.FullName$ */
  607. $$EndLoop
  608. $$Loop Control.type = Popup
  609. #define ResD_$Control.name$    $Control.ItemID$            /* ...Popup menu, $Control.FullName$ */
  610. #define mResD_$Control.name$    $Control.MenuID$
  611. $$EndLoop
  612. $$Loop Control.type = Palette
  613. #define ResD_$Control.name$    $Control.ItemID$            /* ...Palette, $Control.FullName$ */
  614. #define ResD_N_$Control.name$    $Control.NormalID$
  615. $$EndLoop
  616. $$Loop Control.type = HotRect
  617. #define ResD_$Control.name$    $Control.ItemID$            /* ...HotSpot, $Control.FullName$ */
  618. #define sResD_$Control.name$    $Control.StringID$
  619. $$EndLoop
  620. $$Loop Control.type = Sicn
  621. #define ResD_$Control.name$    $Control.ItemID$            /* ...Sicn, $Control.FullName$ */
  622. #define ResD_N_$Control.name$    $Control.NormalID$
  623. #define ResD_H_$Control.name$    $Control.HilitedID$
  624. $$EndLoop
  625.  
  626. $$EndLoop Dialogs
  627. $$Loop Windows
  628. /* Variables for the Window titled  "$Worksheet.FullName$" */
  629. #define ResW_$Worksheet.name$    $Worksheet.ID$            /* Window, $Worksheet.FullName$ */
  630. $$Loop Control.type = Button
  631. #define ResC_$Control.name$    $Control.ID$            /* ...Button, $Control.FullName$ */
  632. $$EndLoop
  633. $$Loop Control.type = Checkbox
  634. #define ResC_$Control.name$    $Control.ID$            /* ...Checkbox, $Control.FullName$ */
  635. $$EndLoop
  636. $$Loop Control.type = Radio
  637. #define ResC_$Control.name$    $Control.ID$            /* ...Radio, $Control.FullName$ */
  638. $$EndLoop
  639. $$Loop Control.type = StaticText
  640. #define sResC_$Control.name$    $Control.StringID$    /* ...Static Text, $Control.FullName$ */
  641. $$EndLoop
  642. $$Loop Control.type = EditText
  643. #define sResC_$Control.name$    $Control.StringID$    /* ...Edit Text, $Control.FullName$ */
  644. $$EndLoop
  645. $$Loop Control.type = List
  646. #define ResC_$Control.name$    $Control.ID$            /* ...List, $Control.FullName$ */
  647. $$EndLoop
  648. $$Loop Control.type = HotRect
  649. #define ResC_$Control.name$    $Control.ID$            /* ...HotSpot, $Control.FullName$ */
  650. #define sResC_$Control.name$    $Control.StringID$
  651. $$EndLoop
  652. $$Loop Control.type = ScrollBar
  653. #define ResC_$Control.name$    $Control.ID$            /* ...ScrollBar, $Control.FullName$ */
  654. $$EndLoop
  655. $$Loop Control.type = Icon
  656. #define ResC_$Control.name$    $Control.ID$            /* ...Icon, $Control.FullName$ */
  657. #define ResC_N_$Control.name$    $Control.NormalID$
  658. #define ResC_H_$Control.name$    $Control.HilitedID$
  659. $$EndLoop
  660. $$Loop Control.type = Picture
  661. #define ResC_$Control.name$    $Control.ID$            /* ...Picture, $Control.FullName$ */
  662. #define ResC_N_$Control.name$    $Control.NormalID$
  663. $$EndLoop
  664. $$Loop Control.type = UButton
  665. #define ResC_$Control.name$    $Control.ID$            /* ...Plugin button, $Control.FullName$ */
  666. #define sResC_$Control.name$    $Control.StringID$
  667. #define ResC_N_$Control.name$    $Control.NormalID$
  668. #define ResC_H_$Control.name$    $Control.HilitedID$
  669. $$EndLoop
  670. $$Loop Control.type = UToggle
  671. #define ResC_$Control.name$    $Control.ID$            /* ...Plugin toggle, $Control.FullName$ */
  672. #define sResC_$Control.name$    $Control.StringID$
  673. #define ResC_N_$Control.name$    $Control.NormalID$
  674. #define ResC_H_$Control.name$    $Control.HilitedID$
  675. $$EndLoop
  676. $$Loop Control.type = UGauge
  677. #define ResC_$Control.name$    $Control.ID$            /* ...Plugin gauge, $Control.FullName$ */
  678. #define sResC_$Control.name$    $Control.StringID$
  679. #define ResC_N_$Control.name$    $Control.NormalID$
  680. #define ResC_H_$Control.name$    $Control.HilitedID$
  681. $$EndLoop
  682. $$Loop Control.type = Popup
  683. #define ResC_$Control.name$    $Control.ID$            /* ...Popup menu, $Control.FullName$ */
  684. #define mResC_$Control.name$    $Control.MenuID$
  685. $$EndLoop
  686. $$Loop Control.type = Palette
  687. #define ResC_$Control.name$    $Control.ID$            /* ...Palette, $Control.FullName$ */
  688. #define ResC_N_$Control.name$    $Control.NormalID$
  689. $$EndLoop
  690. $$Loop Control.type = Sicn
  691. #define ResC_$Control.name$    $Control.ID$            /* ...Sicn, $Control.FullName$ */
  692. #define ResC_N_$Control.name$    $Control.NormalID$
  693. #define ResC_H_$Control.name$    $Control.HilitedID$
  694. $$EndLoop
  695.  
  696. $$EndLoop Windows
  697.  
  698. $$Loop Sounds
  699. #define ResS_$Sound.name$    $Sound.ID$                    /* Sound, $Sound.FullName$ */
  700. $$EndLoop
  701.  
  702. /* ======================================================= */
  703.  
  704. typedef struct UserEventRec{                        /* User Event Record definition */
  705.     short    ID;                                        /* ID for the type of user event */
  706.     short    ID2;                                    /* Optionally used, 2nd ID, sometimes used */
  707.     long    Data1;                                    /* Optionally used, Extra data */
  708.     long    Data2;                                    /* Optionally used, Extra data */
  709.     Handle    theHandle;                                /* Optionally used, Handle */
  710.     struct UserEventRec    **Next;                        /* Handle of next event in the list */
  711. }UserEventRec,*UserEventPRec,**UserEventHRec;
  712.  
  713.  
  714. typedef struct WindowLocRec{                        /* Window location record for Prefs */
  715.     $$Loop ModelessDialogs
  716.     $$if Worksheet.SavePosition
  717.     Point       Loc_$Worksheet.name$;                /* Top Left corner of window */
  718.     $$endif
  719.     $$EndLoop
  720.     $$Loop Windows
  721.     $$if Worksheet.SavePosition
  722.     Point       Loc_$Worksheet.name$;                /* Top Left corner of window */
  723.     $$endif
  724.     $$EndLoop
  725.     short            Pad;                            /* Place holder for empty record */
  726. }WindowLocRec;
  727.  
  728.  
  729. typedef struct HasRec{                                /* Record for Gestalt checks */
  730.     Boolean            ColorQD;                        /* Flag for Color QuickDraw being available */
  731.     Boolean            FPU;                            /* Flag for Floating Point Math Chip being available */
  732.     Boolean            AppleEvents;                    /* Whether AppleEvents are available */
  733.     Boolean            AliasMgr;                        /* Whether AliasMgr is available */
  734.     Boolean            EditionMgr;                        /* Whether EditionMgr is available */
  735.     Boolean            NewStdFile;                        /* Whether HasNewStdFile is available */
  736.     Boolean            PPCToolbox;                        /* Whether PPCToolbox is available */
  737.     Boolean            QuickDraw32Bit;                    /* Whether 32Bit QuickDraw is available */
  738.     Boolean            Gestalt;                        /* Whether Gestalt is available */
  739. }HasRec;
  740.  
  741.  
  742. typedef struct FileRec{                                /* Record for reading and writing files */
  743.     SFTypeList        typeList;                        /* For use in opening files */
  744.     SFReply            Reply;                            /* For use in getting file names */
  745.     StandardFileReply    theStdFileReply;            /* For use in getting file names */
  746.     short            inputRefNum;                    /* For the input file */
  747.     short            outputRefNum;                    /* For the output file */
  748.     Str255             inputFileName;                    /* For the input file */
  749.     Str255             outputFileName;                    /* For the output file */
  750. }FileRec;
  751.  
  752.  
  753. typedef struct PrintingRec{                            /* Record for printing */
  754.     THPrint            hPrint;                            /* Printer record */
  755.     Boolean            PrinterIsOpen;                    /* Whether printer is open or not */
  756.     short            PageCount;                        /* For adding in page number */
  757.     short            LineCount;                        /* For printing */
  758.     short            PrinterVRes,PrinterHRes;        /* Printer resolution */
  759.     short            MaxPrintCharacters;                /* Max characters on one line */
  760.     short            MaxLines;                        /* Maximum lines in one page */
  761.     TPPrPort        pPrPort;                        /* Printer port */
  762.     TPrStatus        prStatus;                        /* Printing status */
  763.     short            CopyCount;                        /* Number of copies to do */
  764. }PrintingRec;
  765.  
  766. /* ======================================================= */
  767.  
  768. $$Loop Alerts
  769. /* Variables for the alert titled  "$Worksheet.FullName$" */
  770. typedef struct $Worksheet.name$Rec{                    /* Record for Alert */
  771.     Boolean            FirstTime;                        /* Flag for first time thru the filter */
  772. $$Loop Control.type = Button
  773.     Boolean            Enable_$Control.name$;            /* ...Button global enable, $Control.FullName$ */
  774. $$EndLoop
  775. $$Loop Control.type = HotRect
  776.     Boolean            Enable_$Control.name$;            /* ...HotSpot global enable, $Control.FullName$ */
  777. $$EndLoop
  778. $$Loop Control.type = Icon
  779.     Boolean            Enable_$Control.name$;            /* ...Icon button global enable, $Control.FullName$ */
  780. $$EndLoop
  781. $$Loop Control.type = Picture
  782. $$if Control.NonGraphic
  783.     Boolean            Enable_$Control.name$;            /* ...Picture button global enable, $Control.FullName$ */
  784. $$endif
  785. $$EndLoop
  786. $$Loop Control.type = UButton
  787.     Boolean            Enable_$Control.name$;            /* ...Plugin Button global enable, $Control.FullName$ */
  788. $$EndLoop
  789. $$Loop Control.type = Sicn
  790.     Boolean            Enable_$Control.name$;            /* ...Sicn global enable, $Control.FullName$ */
  791. $$EndLoop
  792. }$Worksheet.name$Rec;
  793.  
  794. $$EndLoop Alerts
  795. $$Loop Dialogs
  796. /* Variables for the dialog titled  "$Worksheet.FullName$" */
  797. typedef struct $Worksheet.name$Rec{                    /* Record for dialog */
  798.     DialogPtr        theDialog;                        /* Window pointer to this dialog */
  799.     Boolean            ExitDialog;                        /* Flag to exit dialog */
  800. $$Loop Control.type = Button
  801.     Boolean            Enable_$Control.name$;            /* ...Button global enable, $Control.FullName$ */
  802. $$EndLoop
  803. $$Loop Control.type = Checkbox
  804.     Boolean            Enable_$Control.name$;            /* ...Checkbox global enable, $Control.FullName$ */
  805.     short            Value_$Control.name$;
  806. $$EndLoop
  807. $$Loop Control.type = Radio
  808.     Boolean            Enable_$Control.name$;            /* ...Radio global enable, $Control.FullName$ */
  809.     short            Value_$Control.name$;
  810. $$EndLoop
  811. $$Loop Control.type = ScrollBar
  812.     Boolean            Enable_$Control.name$;            /* ...ScrollBar global enable, $Control.FullName$ */
  813.     short            Value_$Control.name$;
  814. $$EndLoop
  815. $$Loop Control.type = Icon
  816.     Boolean            Enable_$Control.name$;            /* ...Icon button global enable, $Control.FullName$ */
  817. $$EndLoop
  818. $$Loop Control.type = Picture
  819. $$if Control.NonGraphic
  820.     Boolean            Enable_$Control.name$;            /* ...Picture button global enable, $Control.FullName$ */
  821. $$endif
  822. $$EndLoop
  823. $$Loop Control.type = EditText
  824.     TEHandle        TE_$Control.name$;                /* ...Edit Text, $Control.FullName$ */
  825.     Str255            TEStr_$Control.name$;
  826.     Rect            TERect_$Control.name$;
  827. $$EndLoop
  828. $$Loop Control.type = UButton
  829.     Boolean            Enable_$Control.name$;            /* ...Plugin Button global enable, $Control.FullName$ */
  830. $$EndLoop
  831. $$Loop Control.type = UToggle
  832.     Boolean            Enable_$Control.name$;            /* ...Plugin toggle global enable, $Control.FullName$ */
  833.     short            Value_$Control.name$;
  834. $$EndLoop
  835. $$Loop Control.type = UGauge
  836.     Boolean            Enable_$Control.name$;            /* ...Plugin guage global enable, $Control.FullName$ */
  837.     short            Value_$Control.name$;
  838. $$EndLoop
  839. $$Loop Control.type = List
  840.     ListHandle        List_$Control.name$;            /* ...List, $Control.FullName$ */
  841.     Rect            ListRect_$Control.name$;
  842. $$EndLoop
  843. $$Loop Control.type = Popup
  844.     Boolean            Enable_$Control.name$;            /* ...Popup menu global enable, $Control.FullName$ */
  845.     short            Value_$Control.name$;
  846. $$EndLoop
  847. $$Loop Control.type = Palette
  848.     Boolean            Enable_$Control.name$;            /* ...Palette global enable, $Control.FullName$ */
  849.     short            Value_$Control.name$;
  850. $$EndLoop
  851. $$Loop Control.type = HotRect
  852.     Boolean            Enable_$Control.name$;            /* ...HotSpot global enable, $Control.FullName$ */
  853.     Rect            Rect_$Control.name$;
  854. $$EndLoop
  855. $$Loop Control.type = Sicn
  856.     Boolean            Enable_$Control.name$;            /* ...Sicn global enable, $Control.FullName$ */
  857. $$EndLoop
  858. }$Worksheet.name$Rec;
  859.  
  860. $$EndLoop
  861. $$Loop Windows
  862. /* Variables for the window titled  "$Worksheet.FullName$" */
  863. typedef struct $Worksheet.name$Rec{                    /* Record for dialog */
  864.     WindowPtr        theWindow;                        /* Window pointer */
  865.     struct $Worksheet.name$Rec    *Next;                /* Handle of next in the list */
  866.     RGBColor        WindowBackColor;                /* Background window color */
  867. $$if Worksheet.Document
  868. $$if Worksheet.ScrollHorz
  869.     ControlHandle    ScrollHHandle;                    /* Scrollbar for horz scrolling */
  870.     short            ScrollHLeftOffset;                /* Offset of control from left side */
  871. $$endif
  872. $$if Worksheet.ScrollVert
  873.     ControlHandle    ScrollVHandle;                    /* Scrollbar for vert scrolling */
  874.     short            ScrollVTopOffset;                /* Offset of control from top edge */
  875. $$endif
  876. $$endif
  877. $$Loop Control.type = Button
  878.     ControlHandle    Ctrl_$Control.name$;            /* ...Button, $Control.FullName$ */
  879.     Boolean            Enable_$Control.name$;
  880. $$EndLoop
  881. $$Loop Control.type = Checkbox
  882.     ControlHandle    Ctrl_$Control.name$;            /* ...Checkbox, $Control.FullName$ */
  883.     Boolean            Enable_$Control.name$;
  884.     short            Value_$Control.name$;
  885. $$EndLoop
  886. $$Loop Control.type = Radio
  887.     ControlHandle    Ctrl_$Control.name$;            /* ...Radio, $Control.FullName$ */
  888.     Boolean            Enable_$Control.name$;
  889.     short            Value_$Control.name$;
  890. $$EndLoop
  891. $$Loop Control.type = ScrollBar
  892.     ControlHandle    Ctrl_$Control.name$;            /* ...ScrollBar, $Control.FullName$ */
  893.     Boolean            Enable_$Control.name$;
  894.     short            Value_$Control.name$;
  895. $$EndLoop
  896. $$Loop Control.type = Icon
  897. $$if Control.NonGraphic
  898.     ControlHandle    Ctrl_$Control.name$;            /* ...Icon button, $Control.FullName$ */
  899.     Boolean            Enable_$Control.name$;
  900. $$endif
  901. $$EndLoop
  902. $$Loop Control.type = Picture
  903. $$if Control.NonGraphic
  904.     ControlHandle    Ctrl_$Control.name$;            /* ...Picture button, $Control.FullName$ */
  905.     Boolean            Enable_$Control.name$;
  906. $$endif
  907. $$EndLoop
  908. $$Loop Control.type = EditText
  909.     TEHandle        TE_$Control.name$;                /* ...Edit Text, $Control.FullName$ */
  910.     Str255            TEStr_$Control.name$;
  911.     Rect            TERect_$Control.name$;
  912. $$EndLoop
  913. $$Loop Control.type = UButton
  914.     ControlHandle    Ctrl_$Control.name$;            /* ...Plugin Button, $Control.FullName$ */
  915.     Boolean            Enable_$Control.name$;
  916. $$EndLoop
  917. $$Loop Control.type = UToggle
  918.     ControlHandle    Ctrl_$Control.name$;            /* ...Plugin toggle, $Control.FullName$ */
  919.     Boolean            Enable_$Control.name$;
  920.     short            Value_$Control.name$;
  921. $$EndLoop
  922. $$Loop Control.type = UGauge
  923.     ControlHandle    Ctrl_$Control.name$;            /* ...Plugin guage, $Control.FullName$ */
  924.     Boolean            Enable_$Control.name$;
  925.     short            Value_$Control.name$;
  926. $$EndLoop
  927. $$Loop Control.type = List
  928.     ListHandle        List_$Control.name$;            /* ...List, $Control.FullName$ */
  929.     Rect            ListRect_$Control.name$;
  930. $$EndLoop
  931. $$Loop Control.type = Popup
  932.     ControlHandle    Ctrl_$Control.name$;            /* ...Popup menu, $Control.FullName$ */
  933.     Boolean            Enable_$Control.name$;
  934.     short            Value_$Control.name$;
  935. $$EndLoop
  936. $$Loop Control.type = Palette
  937.     ControlHandle    Ctrl_$Control.name$;            /* ...Palette, $Control.FullName$ */
  938.     Boolean            Enable_$Control.name$;
  939.     short            Value_$Control.name$;
  940. $$EndLoop
  941. $$Loop Control.type = HotRect
  942.     ControlHandle    Ctrl_$Control.name$;            /* ...HotSpot, $Control.FullName$ */
  943.     Boolean            Enable_$Control.name$;
  944.     Rect            Rect_$Control.name$;
  945. $$EndLoop
  946. $$Loop Control.type = Sicn
  947.     ControlHandle    Ctrl_$Control.name$;            /* ...Sicn, $Control.FullName$ */
  948.     Boolean            Enable_$Control.name$;
  949. $$EndLoop
  950. }$Worksheet.name$Rec,*$Worksheet.name$RecPtr;
  951.  
  952. $$EndLoop
  953.  
  954. /* ======================================================= */
  955. /* ======================================================= */
  956.  
  957. $$CloseFile
  958. $$Message MM Common, mm:mmCommon$Prototype.name$.h
  959. $$File mm:mmCommon$Prototype.name$.h
  960. /*  $CopyRight$ */
  961. /*   mmCommon$Prototype.name$                            Common and Utilitys
  962.  
  963.     Name:  mmCommon$Prototype.name$.h
  964.     Function:  Common for the Gooey¬ specific code.
  965.     History: $Date$ Original by $Author$
  966.  
  967. */
  968.  
  969.  
  970. /* ======================================================= */
  971. /* ======================================================= */
  972.  
  973. extern UserEventHRec    UserEventList;                /* User Event record list start */
  974. extern EventRecord        myEvent;                    /* Event record for all events */
  975. extern Boolean            WNE;                        /* WaitNextEvent trap is available */
  976. extern short            SleepValue;                    /* Sleep value for Wait on events */
  977. extern Boolean            doneFlag;                    /* Exit program flag */
  978. extern TEHandle            theInput;                    /* Used in text edit selections */
  979. extern RgnHandle        cursorRgn;                    /* Cursor region for WaitNextEvent */
  980. extern short            ReplyMode;                    /* Reply mode for AppleEvents */
  981.  
  982. extern Rect                tempRect;                    /* Temporary rect, not for long term use */
  983. extern Str255            sTemp;                        /* Temporary string, not for long term use */
  984. extern short            tempChar;                    /* Temporary use character */
  985. extern long                LTemp;                        /* Temporary use long variable */
  986. extern short            DType;                        /* Temporary use Type of dialog item */
  987. extern Handle            DItem;                        /* Temporary use Handle to the dialog item */
  988. extern ControlHandle    CItem;                        /* Temporary use Control handle */
  989.  
  990. extern WindowLocRec        theWindowLocRec;
  991.  
  992. extern Boolean            Doing_MovableModal;            /* For Movable Modal dialogs */
  993. extern Boolean            HoldOffUserEvents;            /* Flag for holding off UserEvents */
  994. extern Boolean            InTheForeground;            /* Flag for running in MultiFinder foreground */
  995.  
  996. extern ProcessSerialNumber        gSelfPSN;
  997. extern AEAddressDesc                    gSelfAddress;
  998.  
  999. extern HasRec            Has;                        /* Gestalt check results */
  1000. extern FileRec            Files;                        /* Reading and writing files */
  1001. extern PrintingRec        Printing;                    /* Printing */
  1002.  
  1003. extern RGBColor            Black_ForeColor,White_BackColor;/* Standard colors */
  1004.  
  1005. $$Loop Menus
  1006. extern MenuHandle    Menu_$Menu.name$;                    /* Menu handle, $Menu.FullName$ */
  1007. $$EndLoop
  1008.  
  1009. $$Loop HierMenus
  1010. extern MenuHandle    Menu_$Menu.name$;                    /* Hier Menu handle, $Menu.FullName$ */
  1011. $$EndLoop
  1012.  
  1013. $$Loop Alerts
  1014. extern    $Worksheet.name$Rec        Rec_$Worksheet.name$;    /* Record for Alert, "$Worksheet.FullName$" */
  1015. $$EndLoop Alerts
  1016. $$Loop Dialogs
  1017. extern    $Worksheet.name$Rec        Rec_$Worksheet.name$;    /* Record for dialog, "$Worksheet.FullName$" */
  1018. $$EndLoop
  1019. $$Loop Windows
  1020. extern    $Worksheet.name$RecPtr    RecPtr_$Worksheet.name$;    /* Record pointer for window, "$Worksheet.FullName$" */
  1021. extern    $Worksheet.name$RecPtr    ListRecPtr_$Worksheet.name$;
  1022. extern    Boolean                    MultipleAllowed_$Worksheet.name$;
  1023. $$EndLoop
  1024.  
  1025. #ifdef __cplusplus
  1026. extern "C" {
  1027. #endif
  1028. /* Prototypes */
  1029.  
  1030. void     InitAppleEvents(void);                            /* Initialize for AppleEvents */
  1031.  
  1032. pascal OSErr DispatchAppleEvent(AppleEvent *message,AppleEvent *reply,long refcon);
  1033. OSErr AE_OpenedApplication(AppleEvent *message,AppleEvent *reply,long refcon);
  1034. OSErr AE_QuittingApplication(AppleEvent *message,AppleEvent *reply,long refcon);
  1035. Boolean MissedAnyParameters(AppleEvent *message);
  1036. void AE_OpenThisFile(FSSpec *theFSSpec,short WhichFile,short TotalToOpen);
  1037. void AE_PrintThisFile(FSSpec *theFSSpec,short WhichFile,short TotalToOpen);
  1038.  
  1039.  
  1040. /* Handle an activate of the window */
  1041. void DoActivate(void);
  1042.  
  1043. /* See if WaitNextEvent is available */
  1044. Boolean IsWNEIsImplemented(void);
  1045.  
  1046. /* Check for user events */
  1047. void Handle_User_Event(void);
  1048.  
  1049. /* Handle a hit in the window */
  1050. void DoInContent(WindowPtr whichWindow,EventRecord *myEvent);
  1051.  
  1052. /* ======================================================= */
  1053.  
  1054. /* Copy Pascal strings */
  1055. void PStrCopy(Str255 *SourceString, Str255 *DestString);
  1056.  
  1057. /* Concat Pascal strings */
  1058. void PStrCat(Str255 *SourceString, Str255 *DestString);
  1059.  
  1060. /* Compare Pascal strings for exact match, case sensitive */
  1061. Boolean PStrCmp(StringPtr Source1String,StringPtr Source2String);
  1062.  
  1063. WindowPtr Mk_BehindWindow(short theLayer);            /* Get which window to place us behind */
  1064. void Mk_RegisterWindow(WindowPtr theWindowPtr,short theLayer);/* Place layer in RefCon and verify layers */
  1065. void Mk_ClearLayers(void);                            /* Init our arrays for layered windows */
  1066. void Mk_HiliteWindow(WindowPtr theWindowPtr);        /* Hilite our layered window */
  1067. void Mk_DragWindow(WindowPtr theWindowPtr,Point where, Rect bounds);/* Drag our layered window */
  1068. Boolean Mk_Is_FrontWindow(WindowPtr theWindowPtr);    /* Get the front window */
  1069. void Mk_CloseLayeredWindow(WindowPtr theWindowPtr);/* Close a layered window */
  1070.  
  1071. void U_InitPreferences(void);                        /* User Init the preferences */
  1072. void U_GetPrefParams(OSType *PrefCreator,OSType *PrefType,Str255 *thePrefsFilename,long *PrefsRecSize,short *thePrefsFormatRevision);/* User Get the preferences */
  1073. void U_GetPreferences(Handle thePrefsH);            /* User Get the preferences */
  1074. void U_ReadPrefsPrivate(short PrefsRefNum);            /* User Read the preferences */
  1075. void U_SetPreferences(Handle thePrefsH);            /* User Set new preferences */
  1076. void GetPreferences(void);                            /* Get the preferences */
  1077. void SetPreferences(void);                            /* Set new preferences */
  1078.  
  1079. void Play_The_Sound(short ResID);
  1080.  
  1081. void PositionWindow(WindowPtr theWindow,Point  WantLocation,Point DefaultPosition);
  1082.  
  1083. /* See if any user events are available */
  1084. void GetUserEvent(UserEventPRec TheUserEvent);
  1085.  
  1086. /* Add a user event */
  1087. void Add_UserEvent(short ID, short ID2, long  Data1, long Data2, Handle  theHandle);
  1088.  
  1089. /* Set the title for a popup control */
  1090. void SetNameForPopup(ControlHandle theControl);
  1091.  
  1092. /* This is a routine used to make a new list */
  1093. void Make_A_List(ListHandle *theList,Rect *theListRect,WindowPtr theWindow,short theStringResourceID,
  1094.     short theSize,short theFont,Style theStyle,Boolean InDialog);
  1095.  
  1096. /* This is a routine used to add strings to an existing list */
  1097. void Add_List_String(Str255 theString, ListHandle theList, Point *cSize);
  1098.  
  1099. /* This is a routine used to get a string from a TE area, limited to 250 characters */
  1100. void Get_TE_String(TEHandle theTEArea, Str255 *theString);
  1101.  
  1102. /* This is a routine used to create a TE area */
  1103. void Make_TE_Area(TEHandle *theTEArea, Rect *Position,short theFontSize,short theFont,
  1104.     short DefaultStringID);
  1105.  
  1106. /* This is a routine used to plot an Sicn, small 16x16 icon */
  1107. void Plot_Sicn(short theSicnID, Rect *Position);
  1108.  
  1109. /* This is a routine used to handle a scrollbar */
  1110. void HandleWScrollBar(Point myPt,short code,short Increment,short LIncrement,ControlHandle theControl);
  1111.  
  1112. /* Open a file, user selects the file */
  1113. Boolean Do_The_Open_File(short NumberOfTypes,short *theVolRefNum,ProcPtr fileFilter,ProcPtr dlgHook);
  1114.  
  1115. /* Save to a file, user selects the file */
  1116. Boolean Do_The_Save_File ( OSType creator, OSType fileType,Str255 *Prompt,Str255 *DefaultName,
  1117.     short *theVolRefNum,short *theRefNum,ProcPtr dlgHook);
  1118.  
  1119. /* Select a volume */
  1120. Boolean Do_The_Select_Volume (FSSpec *theFile);
  1121.  
  1122. void Close_The_Input_File(void);
  1123. void Open_The_File(void);
  1124. void Close_The_Output_File(void);
  1125. void Save_The_File(void);
  1126. void Select_Volume(void);
  1127.  
  1128.  
  1129. /* Do the page setup */
  1130. void PageSetup(void);
  1131.  
  1132. /* Do the print job setup */
  1133. void PrintJobSetup(void);
  1134.  
  1135. /* Open the printer and driver for use */
  1136. void OpenThePrinter (Boolean *Cancelled);
  1137.  
  1138. /* Close the printer and driver */
  1139. void CloseThePrinter(void);
  1140.  
  1141. void Print_The_Data(void);
  1142.  
  1143.  
  1144. /* Setup a dialog or alert item */
  1145. void SetupTheItem (DialogPtr theDialog,short ItemID,Boolean SizeIt,Boolean ShowIt, 
  1146.     Boolean EnableIt,Boolean SetTheMax,Rect *thePosition ,long ExtraData ,short StringID );
  1147.  
  1148. /* Center a window onto the deepest color screen */
  1149. void CenterOnColorScreen(WindowPtr theWindow);
  1150.  
  1151. /* Get the deepest color screen rect */
  1152. void GetDeepestColorScreenRect(Rect *DeepRect);
  1153.  
  1154. /* Alert and Dialog support routines */
  1155. void HiliteDefaultButton(DialogPtr theDialog,short theItem);
  1156. void CheckKeysInDialog(DialogPtr theDialog,Boolean *valMyFilter,EventRecord *theEvent,short *itemHit);
  1157. void SetupNormalControl(DialogPtr theDialog,short theItem,Boolean Enabled,short InitialValue);
  1158. void SetupHotSpot(DialogPtr theDialog,short theItem,Boolean MakeHotSpot,long LineWidth,
  1159.     long ShadowWidth,short MessageResID,Boolean Enabled);
  1160. void SetupPlugin(DialogPtr theDialog,short theItem,Boolean Enabled,
  1161.     long NormalID,long HilitedID,short MessageResID);
  1162. void SetupMinMaxValue(DialogPtr theDialog,short theItem,short min,short max,short value);
  1163. void SetupPopupMenu(DialogPtr theDialog,short theItem,Boolean Enabled,short theMenuID,short value);
  1164. void SetupPalette(DialogPtr theDialog,short theItem,Boolean Enabled,long NumberRows,long NumberCols,
  1165.     long PalPictureID,long HiliteMethod);
  1166. void SetupIconSicn(DialogPtr theDialog,short theItem,Boolean Enabled,
  1167.     long NormalID,long HilitedID);
  1168. void ClearTheRadio(DialogPtr theDialog,short theItem,short *value);
  1169.  
  1170. /* Window support routines */
  1171. void DrawStaticTextBox(short ResID,Rect *theRect,short Justify,short theSize,short theFont,Style theStyle);
  1172. void DrawStaticLine(short ResID,short Left,short Top,short theSize,short theFont,Style theStyle);
  1173. void DrawTheTEArea(Rect *theTERect,TEHandle theTE,short theSize,short theFont,Style theStyle);
  1174. ControlHandle MakeNormalControl(WindowPtr theWindow,short theResID,Boolean Enabled,short InitialValue);
  1175. ControlHandle MakeHotSpot(WindowPtr theWindow,short theResID,Boolean MakeHotSpot,long LineWidth,
  1176.     long ShadowWidth,short MessageResID,Boolean Enabled);
  1177. ControlHandle MakeIconSicn(WindowPtr theWindow,short theResID,Boolean Enabled,
  1178.     long NormalID,long HilitedID);
  1179. ControlHandle MakePlugin(WindowPtr theWindow,short theResID,Boolean Enabled,
  1180.     long NormalID,long HilitedID,short MessageResID,short InitialValue);
  1181. void MakeMinMaxValue(ControlHandle theControl,short min,short max,short value);
  1182. ControlHandle MakePopupMenu(WindowPtr theWindow,short theResID,Boolean Enabled,short theMenuID,short value);
  1183. ControlHandle MakePalette(WindowPtr theWindow,short theResID,Boolean Enabled,long NumberRows,long NumberCols,
  1184.     long PalPictureID,long HiliteMethod);
  1185.  
  1186. void UpdateTheList(RgnHandle theRgn,ListHandle theList,Rect *theRect,short theSize,short theFont,Style theStyle,Boolean InDialog);
  1187. void ClickInTheList(Point myPt,short modifiers,ListHandle theList,short theSize,short theFont,Style theStyle,Boolean InDialog);
  1188. void Activate_TE_Area(Boolean InDialog,Point myPt,TEHandle theTE,short textSize,short textFont,Style textStyle);
  1189.  
  1190.  
  1191. $$Loop Alerts
  1192. void InitA_$Worksheet.name$(void);
  1193. void PA_$Worksheet.name$(void);
  1194.  
  1195. $$EndLoop
  1196. $$Loop ModalDialogs
  1197. void InitD_$Worksheet.name$(void);            /* Init any global variables */
  1198. void MPD_$Worksheet.name$(void);            /* Handle the modal dialog */
  1199.  
  1200. $$EndLoop
  1201. $$Loop ModelessDialogs
  1202. void Init_$Worksheet.name$(void);            /* Initialize the flag for this dialog, for other routines to use */
  1203. void Moved_$Worksheet.name$(Rect *OldRect, WindowPtr theWindow);    /* We were moved on the screen, or to another screen. */
  1204. void Update_$Worksheet.name$(WindowPtr theWindow);    /* Update the display of this dialog, when an area is uncovered. */
  1205. void Open_$Worksheet.name$(void);            /* Open the dialog and display it on the screen. */
  1206. void Do_$Worksheet.name$(EventRecord *theEvent, WindowPtr theWindow, short itemHit);    /* Handle any events for this dialog, when it is active. */
  1207. void Close_$Worksheet.name$(WindowPtr theWindow);    /* Close this dialog and release it from memory. */
  1208.  
  1209. $$EndLoop
  1210. $$Loop Windows
  1211. void Init_$Worksheet.name$(void);            /* Initialize us so all our routines can be activated */
  1212. void Close_$Worksheet.name$(WindowPtr whichWindow);    /* Close our window */
  1213. void Resized_$Worksheet.name$(Rect *OldRect, WindowPtr whichWindow);    /* Handle resizing scrollbars */
  1214. void Update_$Worksheet.name$(WindowPtr whichWindow);    /* Update our window, someone uncovered a part of us */
  1215. void Open_$Worksheet.name$(void);            /* Open our window and draw everything */
  1216. void Activate_$Worksheet.name$(WindowPtr whichWindow, Boolean Do_An_Activate);    /* Handle activation of our window */
  1217. void Do_$Worksheet.name$(EventRecord *myEvent);    /* Handle action to our window, like controls */
  1218.  
  1219. $$EndLoop
  1220.  
  1221. #ifdef __cplusplus
  1222. }
  1223. #endif
  1224.  
  1225. /* ======================================================= */
  1226. /* ======================================================= */
  1227.  
  1228. $$CloseFile
  1229.  
  1230.  
  1231.